﻿// <copyright file="TrackerMetadata.cs" company="Microsoft Corporation">
// Copyright (c) 2010 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2010-03-27</date>
// <summary>TrackerMetadata class definition</summary>

namespace Microsoft.WebAnalytics.Contracts
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// Tracker Metadata for MEF object type lookup (Used in TrackAction)
    /// </summary>
    /// <remarks>This is to workaround reflection limitations in Silverlight for Windows Phone 7 Series</remarks>
    public class TrackerMetadata : ITrackerMetadata
    {
        /// <summary>
        /// Initializes a new instance of the TrackerMetadata class
        /// </summary>
        /// <param name="metadata">the metadata dictionary</param>
        public TrackerMetadata(IDictionary<string, object> metadata)
        {
            this.ObjectType = metadata["ObjectType"] as Type;
        }

        /// <summary>
        /// Gets the object type
        /// </summary>
        public Type ObjectType { get; private set; }
    }
}
